﻿function IsNullOrWhitespace(input) {
    if (input == null) return true;
    return input.replace(/\s/g, '').length < 1;
}

function TrimWhiteSpace(input) {
    var trimmed = input.replace(/\s+/g, '');;
    return trimmed;
}

function IsCorrectedUrlElement(input)
{
    var re = new RegExp("^[a-zA-Z\-_0-9]+$")

    return !input.match(re);
}